package main

import (
	"gitee.com/godY/daminghu-cli-server/common"
	"gitee.com/godY/daminghu-cli-server/router"
	"gitee.com/godY/daminghu-cli-server/task"
	"github.com/astaxie/beego"
	"github.com/astaxie/beego/logs"
	"os"
)

func main() {
	os.MkdirAll(common.TEMPPATH, os.ModePerm)
	beego.SetLogFuncCall(true)

	beego.BConfig.Log.AccessLogs = true
	beego.BConfig.Log.FileLineNum = true

	logs.SetLogger(logs.AdapterMultiFile, `{"filename":"./log/dmh-cli-svr.log","separate":["emergency", "alert", "critical", "error", "warning", "notice", "info", "debug"]}`)

	task.Cfg()
	router.Cfg()
	beego.Run()
}
